MONTH(numeric expression or numeric variable)

Numeric Expression

Returns an integer. If the argument is a full date or a partial date with a missing day, then the function returns the numeric value of the month component. If the argument is missing both day and month, then the function returns a range of values.

Examples:

DateVar = “01/26/2018” Month(DateVar) returns 1

DateVar = “02/??/2018” Month(DateVar) returns 2

DateVar=”??/??/2018” Month(DateVar) returns -1,[Undefined], min=1, max=12

DateVar=.DK, where normal range is 1/1/2000 to 12/31/2020, MONTH(DateVar) returns -1, [Undefined], min=1, max=12

TODAY = "08/10/2018" Month(TODAY) returns 8

Tip: If the argument passed to Day(), Month(), and Year() is a numeric value and not a date variable, the function will treat the argument as a date and return the appropriate value. For example, if DateVar =43131 (which corresponds to 01/31/2018), then Month(DateVar) returns 1.